package website.lhc.chapter5;

import lombok.extern.slf4j.Slf4j;

/**
 * @author: longhc@citycloud.com.cn
 * @since: 2023/1/4 17:12
 * @version: 1.0
 */
@Slf4j
public class RealImage implements Image {

    private final String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadImage(fileName);
    }

    @Override
    public void display() {
        log.info("display image " + fileName);
    }

    private void loadImage(String fileName) {
        log.info("load image from disk; fileName:{}",fileName);
    }
}
